<?php

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
jimport('joomla.application.component.model');

/**
 *Server Component Order Model
 *
 */
class ServerModelOrder extends JModel
{

    function __construct()
    {
        parent::__construct();

        $array = JRequest::getVar('cid', 0, '', 'array');
        $this->_id = (int)$array[0];
    }

    /**
     * Get id of  selected server
     */
    function getServerId()
    {
        return $this->_id;
    }

    /**
     * Get params of  selected server
     */
    function getServerSelect()
    {
        $query = "SELECT a.* " .
            " FROM #__server AS a " .
            " WHERE (a.published = 1) AND (a.id = " . $this->_id . ") ";

        $this->_db->setQuery($query);
        $result = $this->_db->loadObject();

        return @$result;
    }

}

?>
